TOOLCHAIN = i586-elf-

CC = $(TOOLCHAIN)gcc
LD = $(TOOLCHAIN)ld
AS = $(TOOLCHAIN)as
OBJCOPY = $(TOOLCHAIN)objcopy
OBJDUMP = $(TOOLCHAIN)objdump

OBJS = 8042.o 8253.o 8259.o biostty.o pmap.o smp.o trap.o trapasm.o vectors.o x86_debug.o ioapic.o local_apic.o machine_init.o

all: autoasm $(OBJS)

autoasm: vectors.S

vectors.S:
	./vectors.pl > vectors.S

.c.o:
	$(CC) -I../../include -O -nostdlib -ffreestanding -c -o $*.o $<

.S.o:
	$(AS) -o $*.o $<

clean:
	rm *.o vectors.S

